// pages/city/components/alphabet/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    cities:{
      type:Object,
      observer:function(newValue,oldValue) {
        const letters = []
        for (let i in newValue) {
          letters.push(i)
        }
        this.setData({
          letters
        })
      }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    letters:[]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    gotoTarget:function (event) {
      const name=event.currentTarget.dataset.name;
      this.triggerEvent('goto',{name},{})
    }
  }
})
